PGetSelectIDListTop

Gets the number of top-level selected objects (groups and ungrouped objects only) on the currently displayed pages and gets the object ID, group ID, draw ing number, type, and coordinates for each object and whether the object is linked and transformed. This query does not return information about objects within a selected group; use PGetSelectIDList instead.


Query results

PGetSelectIDListTop is a subclass of PListQuery. This query returns a list of objects. For each object, it returns:

unsigned long nObjectID;

Unique ID of object
unsigned long nMaskID;
Unique ID of mask object if nObjectID is masked
0 if nObjectID is not masked
unsigned long nGroupID;
0 (always 0 for top-level objects)
short nDrawNumber;
Drawing-order number of object
short cTypeOfObject;
0 reserved (currently not used)
1 for text block
2 reserved (currently not used)
3 for line
4 for box
5 for oval
6 for TIFF or bitmap image
7 reserved (currently not used)
8 for PICT
9 for PICT (same as 8)
10 for metafile
11 for EPS
12 for polygon
13 reserved (currently not used)
14 for group
PMBool bTransformed;
false if object has not been transformed
true if object has been transformed
PMBool bLinked;
false if object is not linked to an external file
true if object is linked to an external file
long xLeftOrStart;
x coordinate of left-top handle of object, or starting point of line in twips
long yTopOrStart;
y coordinate of left-top handle of object, or starting point of line in twips
long xRightOrEnd;
x coordinate of bottom-right handle of object, or end point of line in twips
long yBottomOrEnd;
y coordinate of bottom-right handle of object, or end point of line in twips
long xRightOrStart;
x coordinate of right-top handle of object, or starting point of line in twips
long yTopOrStart2;
y coordinate of right-top handle of object, or starting point of line in twips
long xLeftOrEnd;
x coordinate of bottom-left handle of object, or end point of line in twips
long yBotOrEnd2;
y coordinate of bottom-left handle of object, or end point of line in twips
Facing pages. In double-sided, facing-pages mode, PageMaker returns the object list for both pages.

Coordinates for transformed objects. If the object was skewed, rotated, or reflected, the coordinate pairs (xLeftOrStart, yTopOrStart), (xRightOrStart, yTopOrStart2), (xLeftOrEnd, yBotOrEnd2), and (xRightOrEnd, yBottomOrEnd) correspond to the original left-top, right-top, left-bottom, and right-bottom handles, but indicate their new locations.

Coordinates for transformed Group. If the group was skewed, rotated, or reflected, the coordinate pairs (xLeftOrStart, yTopOrStart), (xRightOrStart, yTopOrStart2), (xLeftOrEnd, yBotOrEnd2), and (xRightOrEnd, yBottomOrEnd) correspond to the group's current left-top, right-top, left-bottom, and right -bottom handles.

Left-top handle
original position

Left-top handle
original position

Coordinates for lines. PageMaker returns the corners of the bounding box for most objects, but returns the starting and end points for lines. The first coordinate pair (xLeftOrStart, yTopOrStart) corresponds to the starting point of the line. The second coordinate pair (xRightOrEnd, yBottomOrEnd) corresponds to the end point of the line. The third and fourth coordinate pairs are irrel evant because they duplicate the values of the first two coordinate pairs.

Where the weight of a line lies in relation to the end points depends upon the type of line and whether the user has flipped the weight of the line with the pointer tool to the other side of the line (horizontal and vertical lines only). The illustration above shows the default locations: Horizontal lines hang down from the end points; vertical lines hang to the right of the end points; diagonal lines are centered.

Example. The following example creates a new publication, draws and styles two boxes (of different sizes), and skews the second box. It then selects both boxes and groups them. It queries for the top-level object. In this case, only the group object is returned. The two boxes are not included since they are part of the group.

PNew();
PBox(0, 0, 3, 1);
PLineStyle(kLineOnePoint);
PFillStyle(kFillNone);
PBox(0, 0, 2, 1);
PLineStyle(kLineNone);
PFillStyle(kFillSolid);
PSkew(kAlignLeftTop, -450)
PSelectAll();
PGroup();

PGetSelectIDListTop id;
id.Count();       // expected: 1
id.cTypeOfObject;  // 14  (group)
...


See also

The PGetObjectList, PGetObjectLoc , PGetSelectList, PGetSelectIDList, PGetTransform, PGetLineStyle, PGetGroupList, and PGetObjectIDListTop queries


Copyright © 1996, Adobe Systems Incorporated. All rights reserved.

Comments or suggestions? Contact Adobe Developer Support